package com.frank.subject.domain.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.frank.subject.domain.entity.SubjectInfoBo;
import com.frank.subject.domain.entity.SubjectOptionBo;
import com.frank.subject.infra.basic.entity.SubjectInfo;
import com.frank.subject.infra.es.subject.entity.SubjectInfoEs;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author Frank Zou
 * @version v0.0.1
 * @date 2024/1/25 11:23 AM
 * @description
 */
@Mapper
public interface SubjectInfoBoConverter {

    SubjectInfoBoConverter INSTANCE = Mappers.getMapper(SubjectInfoBoConverter.class);

    SubjectInfo convertBoToInfo(SubjectInfoBo subjectInfoBO);

    SubjectInfoBo convertEntityAndOptionToBo(SubjectOptionBo subjectOptionBo, SubjectInfo subjectInfo);

    SubjectInfoBo convertEntityToBo(SubjectInfo subjectInfo);

    Page<SubjectInfoBo> convertEntityPageToBoPage(Page<SubjectInfo> subjectInfoPage);

    SubjectInfoEs convertBoToEs(SubjectInfoBo subjectInfoBO);

    Page<SubjectInfoBo> convertEsPageToBoPage(Page<SubjectInfoEs> subjectInfoEsPage);

    List<SubjectInfoBo> convertEntityListToBoList(List<SubjectInfo> subjectList);

    List<SubjectInfoEs> convertBoListToEsList(List<SubjectInfoBo> subjectInfoBoList);
}
